from django.conf.urls import url

from quesanw import views
from quesanw.views import QuestionDetailView, FocusView,UsefulChangeView,AnswerUsefulView, AnswerQuestionSerializer, \
    QuestionChangeSeralizer

urlpatterns = [
    # url(r"^question/index/$",QuestionDetailView.as_view()),
    url(r"^question/(?P<pk>\d+)/$",QuestionDetailView.as_view()),
    url(r"^question/focus/$",FocusView.as_view()),
    url(r"^question/useful/$",UsefulChangeView.as_view()),
    url(r"^answer/useful/$",AnswerUsefulView.as_view()),
    url(r"^question/answer/(?P<pk>\d+)/$",AnswerQuestionSerializer.as_view()),
    url(r"^question/change/(?P<pk>\d+)/$",QuestionChangeSeralizer.as_view()),
    url(r"^questions/$", views.QuestionListView.as_view()),
    url(r'^tags/$', views.TagListView.as_view()),
    url(r"^tag/(?P<pk>[\d]+)/$", views.TagDetailView.as_view()),
    url(r"^tagfocus/(?P<tag>[\d]+)/(?P<user>[\d]+)/$", views.UserFoucsDetailTagView.as_view()),
    url(r'^question/submit/$', views.QuestionSubmitView.as_view()),
    url(r'^questions/search/$', views.QuestionSearchView.as_view()),
    url(r'^tags/search/$', views.TagSearchView.as_view())



]